package com.hznu.jspFinal.service;

import com.hznu.jspFinal.dao.ComposepaperMapper;
import com.hznu.jspFinal.entity.Composepaper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComposePaperServiceImpl implements ComposePaperService {
    @Autowired
    private ComposepaperMapper composepaperMapper;

    @Override
    public void insert(Composepaper composepaper) {
        composepaperMapper.insert(composepaper);
    }

    @Override
    public void delete(Integer id) {
        composepaperMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void update(Composepaper composepaper) {
        composepaperMapper.updateByPrimaryKey(composepaper);
    }

    @Override
    public Composepaper selectByPrimaryKey(Integer id) {
        return composepaperMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Composepaper> selectByPaperId(Integer paperid) {
        return composepaperMapper.selectByPaperId(paperid);
    }
}
